<template>
  <div id="app" class="app">
    <router-view :key="vueKey"></router-view>
    <anovLogin />
  </div>
</template>
<script>
import { mapState } from "vuex"
import anovLogin from "@/assets/js/app/baseComponents/anovLogin"

const isInYZHIframe = window.top !== window
export default {
  data() {
    return {
      isInYZHIframe
    }
  },
  pageSize: {
    //设计稿尺寸
    width: 1920,
    height: 1080
  },
  computed: {
    ...mapState(["vueKey"])
  },
  watch: {
    // $route(v, v1) {
    //   if (v.name == 'firstPage') {
    //     app.envServer.designSize = { w: 1920, h: 1080 }
    //   } else {
    //     app.envServer.designSize = { w: 3840, h: 1080 }
    //   }
    // }
  },
  mounted() {
    app.$once(app.EventType.pageTlStart, () => {
      this.init()
    })
  },
  methods: {
    init() {
      let tl = new TimelineMax()
      return tl
    }
  },
  components: { anovLogin }
}
</script>
<style lang="scss" scoped>
#app {
  position: absolute;
  box-sizing: border-box;
  // background: #181e24 url('../public/img/body-bg.png');
  background: #000 url("../public/img/body-bg.png");
  background-size: cover;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
</style>
